package com.sky.Service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sky.dto.*;
import com.sky.entity.Orders;
import com.sky.vo.OrderPaymentVO;
import com.sky.vo.OrderSubmitVO;
import com.sky.vo.OrderVO;
import org.springframework.transaction.annotation.Transactional;

public interface OrderService extends IService<Orders> {

    //添加注解式事务
    @Transactional
    public OrderSubmitVO submitOrderInfo(OrdersSubmitDTO ordersSubmitDTO);

    public OrderPaymentVO payment(OrdersPaymentDTO ordersPaymentDTO) throws Exception;

    public void paySuccess(String outTradeNo);

    @Transactional
    public OrderVO getOrderDetail(Long id);

    public IPage<OrderVO> getHistoryOrders(OrdersPageQueryDTO ordersPageQueryDTO);

    public void cancelUserOrder(Long id);

    public IPage<Orders> getQueryByPage(OrdersPageQueryDTO ordersPageQueryDTO);

    public OrderVO getAdminOrderDetail(Long id);

    public void confirmOrder(OrdersConfirmDTO ordersConfirmDTO);

    public void rejectOrder(OrdersRejectionDTO ordersRejectionDTO);

    public void deliveryOrder(Long id);

    public void completeOrder(Long id);

    public void cancelAdminOrder(OrdersCancelDTO ordersCancelDTO);
}

